The present invention relates to in-memory database systems, and in particular, to memory management for in-memory database systems.
Unless otherwise indicated herein, the approaches described in this section are not prior art to the claims in this application and are not admitted to be prior art by inclusion in this section.
A database is an organized collection of data, stored and accessed electronically. Database designers typically organize the data to model aspects of reality in a way that supports processes requiring information.
A database management system (DBMS) is the software that interacts with end users, applications, and the database itself to capture and analyze data. A general-purpose DBMS allows the definition, creation, querying, update, and administration of databases. The sum total of the database, the DBMS and its associated applications can be referred to as a “database system”. Often the term “database” is used to loosely refer to any of the DBMS, the database system or an application associated with the database.
An in-memory database system (IMDBS or IMDB, also main memory database system (MMDBS) or memory resident database (MRDB)) is a database management system that primarily relies on main memory for computer data storage. It is contrasted with database management systems that rely on a disk storage mechanism. In-memory databases are faster than disk-optimized databases because disk access is slower than memory access, and the internal optimization algorithms are simpler and execute fewer CPU instructions. Accessing data in memory eliminates seek time when querying the data, which provides faster and more predictable performance than disk. The memory of an IMDB may be volatile (e.g., random access memory) or non-volatile (e.g., flash memory). Although the IMDB is noteworthy for the aspect that it “primarily relies on main memory”, the IMDB may also include a disk or other persistent storage (e.g., for backup purposes). (Of course, both non-IMDB systems and IMDB systems have memory, but one of ordinary skill in the database art appreciates that since the internal optimization algorithms differ, applying features developed for non-IMDB systems to IMDB systems is not at all straightforward.) An example IMDB is described in U.S. Application Pub. No. 2009/0240663. An example commercially available IMDB is the SAP HANA® in-memory data platform from SAP SE.
For an IMDB when the size of the data exceeds the size of the memory, the IMDB may include a memory management system to manage the portion of the data that is present in the main memory at a given time. In general, the memory management system coordinates storage of the data between the main memory and another component, such as a disk system. The memory management system may use a number of strategies to manage this coordination. One strategy is to partition the data into units (e.g., pages), to load particular units into the main memory when needed, and to replace those units with other pages as needed in the main memory. An example memory management system for an IMDB is described in U.S. Application Pub. No. 2016/0012089.